
import counter ,{CounterState} from './counter'
import todo ,{TodoState} from './todos'
import {combineReducers} from 'redux'
import history from '@/history'
import { connectRouter } from 'connected-react-router'
let reducers = {
    counter,
    todo,
    router: connectRouter(history)
}

type ReducersType = typeof reducers
type CombinedState = {
    [key in keyof ReducersType]: ReturnType<ReducersType[key]>
}
export { CombinedState, CounterState, TodoState}
let combineReducer = combineReducers(reducers)

export default combineReducer;
